Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor for readability in #identity method in OmniAuth::Strategies::Identity #123

Merged

Conversation

Xeragus
Copy link

@Xeragus Xeragus commented Sep 18, 2024

This PR improves readability of the identity method in OmniAuth::Strategies::Identity

  1. conditions.to_hash is redundant, since to_hash doesn't change the caller, and the return of that call is never stored anywhere
  2. instead of having options[:locate_conditions] three times, it is now stored in a variable that is used below, which in turn allows for a ternary operator instead of an if-else

Copy link
Member

@pboling pboling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Thanks!

@pboling pboling merged commit cfa52cc into omniauth:master Sep 18, 2024
@pboling
Copy link
Member

pboling commented Nov 18, 2024

@Xeragus Released in v3.1.0 and v3.1.1!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants